<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
	<th:block th:include="include :: header('新增话题')" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-topic-add">

			<div class="form-group">	
				<label class="col-sm-2 control-label">话题名称：</label>
				<div class="col-sm-3">
					<input id="topicName" name="topicName" class="form-control" type="text">
				</div>

				<label class="col-sm-2 control-label">话题等级：</label>
				<div class="col-sm-3">
					<input id="topicLevel" name="topicLevel" class="form-control" type="number">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-2 control-label">话题简介：</label>
				<div class="col-sm-8">
					<textarea id="topicIntroduction" name="topicIntroduction" class="form-control" ></textarea>
				</div>
			</div>

			<!--<div class="form-group">	-->
				<!--<label class="col-sm-3 control-label">有效值：</label>-->
				<!--<div class="col-sm-8">-->
					<!--<input id="valid" name="valid" class="form-control" type="text">-->
				<!--</div>-->
			<!--</div>-->
			<!--<div class="form-group">	-->
				<!--<label class="col-sm-3 control-label">建立日期：</label>-->
				<!--<div class="col-sm-8">-->
					<!--<input id="createDate" name="createDate" class="form-control" type="text">-->
				<!--</div>-->
			<!--</div>-->
			<!--<div class="form-group">	-->
				<!--<label class="col-sm-3 control-label">修改日期：</label>-->
				<!--<div class="col-sm-8">-->
					<!--<input id="modifyDate" name="modifyDate" class="form-control" type="text">-->
				<!--</div>-->
			<!--</div>-->
		</form>
	</div>
    <div th:include="include::footer"></div>
    <script type="text/javascript">
		var prefix = ctx + "topic/topic"
		$("#form-topic-add").validate({
			rules:{
				xxxx:{
					required:true,
				},
			},
			focusCleanup: true
		});
		
		function submitHandler() {
	        if ($.validate.form()) {
	            $.operate.save(prefix + "/add", $('#form-topic-add').serialize());
	        }
	    }
	</script>
</body>
</html>
